home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / tabvie.zip / MAINFRM.CPP < prev    next >
C/C++ Source or Header  |  1994-04-06  |  2KB  |  93 lines

  1. // mainfrm.cpp : implementation of the CMainFrame class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "tab.h"
  6.  
  7. #include "mainfrm.h"
  8. #include "tabdoc.h"
  9. #include "mainview.h"
  10. #include "ctl3d.h"
  11.  
  12. #ifdef _DEBUG
  13. #undef THIS_FILE
  14. static char BASED_CODE THIS_FILE[] = __FILE__;
  15. #endif
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CMainFrame
  19.  
  20. IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
  21.  
  22. BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
  23.     //{{AFX_MSG_MAP(CMainFrame)
  24.     ON_WM_SYSCOLORCHANGE()
  25.     //}}AFX_MSG_MAP
  26. //      ON_COMMAND_EX(ID_GRAPHICS, OnSwitchTabs)
  27. //    ON_COMMAND_EX(ID_TIMELINE, OnSwitchTabs)
  28. END_MESSAGE_MAP()
  29.  
  30.  
  31. /////////////////////////////////////////////////////////////////////////////
  32. // CMainFrame construction/destruction
  33.  
  34. CMainFrame::CMainFrame()
  35. {
  36.     // TODO: add member initialization code here
  37. }
  38.  
  39. CMainFrame::~CMainFrame()
  40. {
  41. }
  42.  
  43.  
  44. /////////////////////////////////////////////////////////////////////////////
  45. // CMainFrame diagnostics
  46.  
  47. #ifdef _DEBUG
  48. void CMainFrame::AssertValid() const
  49. {
  50.     CMDIFrameWnd::AssertValid();
  51. }
  52.  
  53. void CMainFrame::Dump(CDumpContext& dc) const
  54. {
  55.     CMDIFrameWnd::Dump(dc);
  56. }
  57.  
  58. #endif //_DEBUG
  59.  
  60. /////////////////////////////////////////////////////////////////////////////
  61. // CMainFrame message handlers
  62. #if 0
  63. BOOL CMainFrame::OnSwitchTabs(UINT nID)
  64. {
  65.     CMDIChildWnd* pChild = MDIGetActive();
  66.     ASSERT(pChild != NULL);
  67.     CView* pView = (CView*)(pChild->GetActiveView());
  68.     ASSERT(pView != NULL);
  69.     CMainView* pMainView = (CMainView*)pView->GetParent();
  70.     ASSERT(pMainView != NULL);
  71.      
  72.     if(!pMainView->IsKindOf(RUNTIME_CLASS(CMainView)))
  73.         return 0;
  74.  
  75.     switch(nID)
  76.     {
  77.         case ID_GRAPHICS:
  78.             pMainView->switchTab(0);
  79.             break;
  80.         case ID_TIMELINE:
  81.             pMainView->switchTab(1);
  82.             break;
  83.     }
  84.     return 1;
  85. }
  86. #endif
  87.  
  88. void CMainFrame::OnSysColorChange()
  89. {
  90.     CMDIFrameWnd::OnSysColorChange();
  91.     Ctl3dColorChange();    
  92. }
  93.